<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Aside",
  props:{
    isCollapse:{
      type:Boolean,
      default(){
        return false
      }
    }
  }
}
</script>

<template>
  <div>
    <el-aside :width="isCollapse ? '64px' : '200px'"
              style="background-color: rgb(238, 241, 246);transition: width .3s">
      <div style="display: flex;justify-content: center;align-content: center;height: 60px;line-height: 60px">
        {{ isCollapse ? '后台' : '后台管理系统' }}
      </div>
      <el-menu default-active="1-4-1" class="el-menu-vertical-demo"
               :collapse="isCollapse">
        <el-menu-item index="1">
          <template>
            <i class="el-icon-location"></i>
            <span slot="title">系统首页</span>
          </template>
        </el-menu-item>
        <el-menu-item index="2">
          <i class="el-icon-menu"></i>
          <span slot="title">系统首页</span>
        </el-menu-item>
        <el-menu-item index="3">
          <i class="el-icon-document"></i>
          <span slot="title">系统首页</span>
        </el-menu-item>
        <el-menu-item index="4">
          <i class="el-icon-setting"></i>
          <span slot="title">信息管理</span>
        </el-menu-item>
      </el-menu>
    </el-aside>
  </div>
</template>

<style>
.el-aside {
  color: #333;
  height: 100vh;
  .el-menu{
    border-right: 0;
  }
}
</style>
